<template>
	<mu-container>
		<router-view />

		<mu-bottom-nav :value.sync="shift" style="margin-top: 10px;">
			<mu-bottom-nav-item title="记账" exact-active-class="mu-bottom-item-active" exact to="/" icon="local_offer"></mu-bottom-nav-item>
			<mu-bottom-nav-item title="历史" exact-active-class="mu-bottom-item-active" exact to="HistoricalNews" icon="restore"></mu-bottom-nav-item>
			<mu-bottom-nav-item title="关于" exact-active-class="mu-bottom-item-active" exact to="PersonalCenter" icon="location_on"></mu-bottom-nav-item>
		</mu-bottom-nav>
	</mu-container>
</template>

<script>
	export default {
		name: 'App',
		data() {
			return {
				shift: '/',
			}
		},
		mounted() {
			this.login();
		},
		methods: {
			//登录
			login() {

				//获取值
				let self = this;
				self.$ajax.get("/login")
					.then(function(res) {
						self.code = res.data.code;
						if (self.code == 200) {
							localStorage.setItem('user', JSON.stringify(res.data.data));
						}
					})
					.catch(function(err) {
						console.log(err);

					});
			}
		}
	}
</script>

<style>
</style>
